<rd-header>
  <rd-header-title title-text="Endpoints">
    <a data-toggle="tooltip" title="Refresh" ui-sref="portainer.endpoints" ui-sref-opts="{reload: true}">
      <i class="fa fa-sync" aria-hidden="true"></i>
    </a>
  </rd-header-title>
  <rd-header-content>Endpoint management</rd-header-content>
</rd-header>

<div class="row" ng-if="!applicationState.application.endpointManagement">
  <div class="col-sm-12">
    <rd-widget>
      <rd-widget-header icon="fa-exclamation-triangle" title-text="Endpoint management is not available">
      </rd-widget-header>
      <rd-widget-body>
        <span class="small text-muted">Portainer has been started using the <code>--external-endpoints</code> flag.
          Endpoint management via the UI is disabled.
          <span ng-if="applicationState.application.authentication">You can still manage endpoint access.</span>
        </span>
      </rd-widget-body>
    </rd-widget>
  </div>
</div>

<div class="row">
  <div class="col-sm-12">
    <endpoints-datatable
    title-text="Endpoints" title-icon="fa-plug"
    table-key="endpoints"
    order-by="Name" 
    endpoint-management="applicationState.application.endpointManagement"
    access-management="applicationState.application.authentication"
    remove-action="removeAction"
    retrieve-page="getPaginatedEndpoints"
    ></endpoints-datatable>
  </div>
</div>
